package com.fqcar.fqdf.entity;

import android.os.Parcel;
import android.os.Parcelable;

import com.fqdf.framework.android.net.response.BaseRespBean;

/**
 * Created by lvsidong on 17/10/19.
 *
 * 充电桩信息
 */
public class StubInfo extends BaseRespBean implements Parcelable{

    public int state;
    public int stubId;
    public Double lat;
    public Double lng;
    public boolean isSelect;

    public int getState() {
        return state;
    }

    public void setState(int state) {
        this.state = state;
    }

    public int getStubId() {
        return stubId;
    }

    public void setStubId(int stubId) {
        this.stubId = stubId;
    }

    public Double getLat() {
        return lat;
    }

    public void setLat(Double lat) {
        this.lat = lat;
    }

    public Double getLng() {
        return lng;
    }

    public void setLng(Double lng) {
        this.lng = lng;
    }

    public boolean isSelect() {
        return isSelect;
    }

    public void setSelect(boolean select) {
        isSelect = select;
    }

    public static Creator<StubInfo> getCREATOR() {
        return CREATOR;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeInt(this.state);
        dest.writeInt(this.stubId);
        dest.writeValue(this.lat);
        dest.writeValue(this.lng);
        dest.writeByte(this.isSelect ? (byte) 1 : (byte) 0);
    }

    public StubInfo() {
    }

    protected StubInfo(Parcel in) {
        this.state = in.readInt();
        this.stubId = in.readInt();
        this.lat = (Double) in.readValue(Double.class.getClassLoader());
        this.lng = (Double) in.readValue(Double.class.getClassLoader());
        this.isSelect = in.readByte() != 0;
    }

    public static final Creator<StubInfo> CREATOR = new Creator<StubInfo>() {
        @Override
        public StubInfo createFromParcel(Parcel source) {
            return new StubInfo(source);
        }

        @Override
        public StubInfo[] newArray(int size) {
            return new StubInfo[size];
        }
    };
}
